Skip to content

feat(S2): rates of fill level and site sensors in W - #290

Merged
Flix6x merged 3 commits into
dev/s2-frbc-completefrom
feat/s2-leakage-and-units
Nov 9, 2026
Merged

Flix6x merged 3 commits into
dev/s2-frbc-completefrom
feat/s2-leakage-and-units

Conversation

@Flix6x

@Flix6x Flix6x commented Nov 9, 2026

Copy link
Copy Markdown
Member

Split off from #289, as asked, so that the unit changes reach 0.10.0 without the usage correction (#286), which is on hold. #289's leakage-as-usage work stays with #286, since it builds on #286's inline usage.

What

  • fill_rate_unit (default W; also kW or MW). S2 states fill rates and usage per second. In kWh/s, a heat buffer's rates of some tens of watts read near 1e-5. So the fill rate and the usage forecast are now recorded in a power unit. FlexMeasures converts them into the sensor's own unit. Any other unit is refused when the handler is created.
  • Site sensor units. Every sensor the site sets up now suits a residential site: powers and rates of fill level in W, energy and fill levels in kWh, prices per kWh. A larger site, such as one with charge points, passes its own sensors plus power_unit and fill_rate_unit in handler_options. Sensors an existing site already has are reused by name and keep their units.

The leakage is still recorded as a storage efficiency (%) here; it moves to W with #289's work.

Evidence

  • Tests: 479 S2 tests pass. S2: plan the declared leakage as part of the usage #289's unit tests come along: the fill rate in each fill_rate_unit, whatever the power and energy units; the refusal of a unit that is no power unit; the value of a posted fill rate; and the site sensors' units.
  • Mutation gate: 12 of 12 mutants killed: S2: plan the declared leakage as part of the usage #289's eight unit mutants that apply here (a conversion skipped, by 3600, a unit per second, any unit accepted, a default of kW, and so on), plus four on the site sensors' units.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CcpawsJs74cSwFLXkz7ZwW

Flix6x and others added 2 commits November 10, 2026 00:09
S2 states fill rates and usage per second, which in kWh/s puts a heat buffer's rates near 1e-5. Ported from #289 without its leakage-as-usage work, which stays with #286.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CcpawsJs74cSwFLXkz7ZwW
Signed-off-by: F.N. Claessen <[email protected]>
Consistent with the handler's defaults, and readable at residential scale. Sensors an existing site already has are reused by name and keep their units. Ported from #289.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CcpawsJs74cSwFLXkz7ZwW
Signed-off-by: F.N. Claessen <[email protected]>
@Flix6x Flix6x added this to the 0.10.0 milestone Nov 9, 2026
@Flix6x Flix6x added the S2 label Nov 9, 2026
@Flix6x
Flix6x merged commit e102532 into dev/s2-frbc-complete Nov 9, 2026
19 checks passed
@Flix6x
Flix6x deleted the feat/s2-leakage-and-units branch November 9, 2026 23:20
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 42718610932

Warning

No base build found for commit d38f63c on dev/s2-frbc-complete.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 95.951%

Details

  • Patch coverage: 9 of 9 lines across 2 files are fully covered (100%).

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 3186
Covered Lines: 3057
Line Coverage: 95.95%
Coverage Strength: 4.57 hits per line

💛 - Coveralls

Flix6x added a commit that referenced this pull request Nov 9, 2026
#279)

Second of two PRs that finish the S2 FRBC Customer Energy Manager: #271 to #277, #283 to #285, #287, #288 and #290. The usage correction (#286, with #289) is held back.

Signed-off-by: F.N. Claessen <[email protected]>
Flix6x added a commit that referenced this pull request Nov 10, 2026
…ection

#290 carried #289's unit changes on their own, so its conflicts resolve to this branch's side, which already has them along with the leakage as usage. #287's handling of an early actuator status and #288's changelog wording are kept, and the changelog links #290 next to #289.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CcpawsJs74cSwFLXkz7ZwW
Signed-off-by: F.N. Claessen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants